<template>
  <div class="insurance-page">

    <!-- 业务办理区域 -->
    <div class="business-section">
      <h2>业务办理</h2>
      <div class="timeout-tip">119 内无操作，将会退出登录</div>
    </div>

    <!-- 个人账户共济管理区域 -->
    <div class="account-management">
      <div class="title-wrapper">
        <img
          src="https://pic.imgdb.cn/item/66d858835c445f1665fed85e.png"
          alt="icon"
          class="icon"
        >
        <h3>个人账户共济管理</h3>
      </div>

      <!-- 添加家庭成员表单 -->
      <div class="add-family-form">
        <h4>添加家庭成员</h4>

        <el-form>
          <el-form-item>
            <label class="form-label">姓 名</label>
            <el-input
              placeholder="请输入姓名"
              class="form-input"
            />
          </el-form-item>

          <el-form-item>
            <label class="form-label">身份证号</label>
            <el-input
              placeholder="请输入身份证号"
              class="form-input"
            />
          </el-form-item>

          <el-form-item>
            <label class="form-label">关 系</label>
            <el-select
              placeholder="请选择家庭成员与您的关系"
              class="form-input"
            >
              <el-option label="配偶" value="spouse" />
              <el-option label="子女" value="children" />
              <el-option label="父母" value="parents" />
            </el-select>
          </el-form-item>

          <el-form-item>
            <label class="form-label">请选择验证方式</label>
            <el-select
              v-model="verifyMethod"
              placeholder="请选择验证方式"
              class="form-input"
            >
              <el-option label="医保电子凭证" value="medicalEcard" />
            </el-select>
          </el-form-item>

          <el-form-item>
            <label class="form-label">请输入亲属医保电子凭证密码</label>
            <el-input
              v-model="password"
              type="password"
              placeholder="请输入密码"
              class="form-input"
            />
          </el-form-item>

          <el-form-item>
            <label class="form-label">承诺书签字</label>
            <el-button type="primary" class="commitment-btn">
              <img
                src="https://pic.imgdb.cn/item/66d858b15c445f1665ff3a7a.png"
                alt="commitment-icon"
                class="commitment-icon"
              >
              点击生成承诺书
            </el-button>
          </el-form-item>

          <el-form-item>
            <el-button type="primary" class="add-btn">添加家庭成员</el-button>
          </el-form-item>
        </el-form>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'InsurancePage',
  data() {
    return {
      password: '',
      verifyMethod: 'medicalEcard'
    }
  }
}
</script>

<style scoped>
/* 页面整体背景色 */
.insurance-page {
  background: linear-gradient(to bottom, #2d8cf0, #8cc5ff);
  min-height: 100vh;
  padding: 10px;
  box-sizing: border-box;
}

.logo {
  width: 50px;
  height: 50px;
  margin-right: 10px;
}

.title {
  font-size: 24px;
  color: #fff;
  font-weight: bold;
}

.time {
  margin-left: auto;
  font-size: 20px;
  color: #fff;
}

.date {
  font-size: 16px;
  color: #fff;
  margin-left: 10px;
}

/* 业务办理区域样式 */
.business-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #1976d2;
  color: #fff;
  padding: 10px 15px;
  margin-top: 10px;
  border-radius: 5px;
}

.business-section h2 {
  font-size: 20px;
  margin: 0;
}

.timeout-tip {
  color: #ffd700;
  font-size: 14px;
  background-color: rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: 10px;
}

/* 个人账户共济管理区域样式 */
.account-management {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 20px;
  margin-top: 10px;
}

.title-wrapper {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.icon {
  width: 30px;
  height: 30px;
  margin-right: 10px;
}

.title-wrapper h3 {
  font-size: 22px;
  color: #fff;
  margin: 0;
}

/* 添加家庭成员表单样式 */
.add-family-form {
  background-color: #fff;
  border-radius: 10px;
  padding: 20px;
}

.add-family-form h4 {
  font-size: 18px;
  color: #1976d2;
  margin-top: 0;
  margin-bottom: 20px;
}

.el-form-item {
  margin-bottom: 20px !important;
}

.form-label {
  font-size: 16px;
  color: #333;
  margin-bottom: 8px;
  display: block;
}

.form-input {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #ddd;
  padding: 8px 12px;
  box-sizing: border-box;
}

.commitment-btn {
  width: 100%;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #e3f2fd;
  color: #1976d2;
  border: 1px solid #bbdefb;
}

.commitment-icon {
  width: 20px;
  height: 20px;
  margin-right: 5px;
}

.add-btn {
  width: 100%;
  border-radius: 20px;
  font-size: 18px;
  background-color: #1976d2;
}
</style>
